package com.bsoft.gol.hcs.clinical.dao;


import ctd.persistence.annotation.DAOMethod;
import ctd.persistence.annotation.DAOParam;
import ctd.persistence.support.hibernate.HibernateSupportDelegateDAO;
import hcn.base.reviewdrug.MedicationTakeWay;

import java.util.List;

public abstract class MedicationTakeWayDAO extends HibernateSupportDelegateDAO<MedicationTakeWay> {
    @DAOMethod(sql = " from MedicationTakeWay where orgId =:hospitalCode and wayStatus = 1  order by sort asc")
    public abstract List<MedicationTakeWay> queryMedicationTakeWay(@DAOParam("hospitalCode") String hospitalCode);

    @DAOMethod(sql = " from MedicationTakeWay where wayId =:wayId and orgId=:orgId")
    public abstract MedicationTakeWay getMedicationTakeWayByOrgId(@DAOParam("wayId") String wayId, @DAOParam("orgId") String orgId);

    @DAOMethod(sql = " from MedicationTakeWay where dicItemId =:dicItemId and orgId=:orgId ")
    public abstract MedicationTakeWay getMedicationTakeWayByDicItemId(@DAOParam("dicItemId") Integer dicItemId, @DAOParam("orgId") String orgId);

}
